<template>
  <div>
    <header class="header">
      <span v-if="$route.meta.back" class="back" @click="$router.go(-1)">返回</span>
     <div class="text">{{$route.meta.title}}</div>
     <router-link to="/register" v-if="$route.meta.register" class="register">注册</router-link>

    </header>
<!-- 一级路由视图 -->
<router-view class="con"></router-view>


  </div>
</template>

<script>
export default {

}
</script>

<style lang="less" scoped>
@import './less/index.less';


.con{
  padding-top: 0.6rem;
}
.header{
  width: 100vw;
  height: 0.6rem;
  background: @primary;
  position: fixed;
  left: 0;
  top: 0;
  font-size: 0.3rem;
}
.back{
  position: absolute;
  left: 0.2rem;
  line-height: 0.6rem;
  color: #fff;
   font-size: 0.3rem;
}
.text{
  width: 100%;
  line-height: 0.6rem;
  text-align: center;
  color: #fff;
   font-size: 0.3rem;
}
.register{
  position: absolute;
  right: 0.2rem;
  line-height: 0.6rem;
  color: #fff;
  top: 0;
   font-size: 0.3rem;
}


</style>